
import 'package:baby/Entities/Comment/Comment.dart';
import 'package:baby/Entities/Entity.dart';
import 'package:baby/Entities/Name.dart';
import 'package:baby/StateManagement/ModelProvider.dart';
import 'package:baby/StateManagement/ObservableList.dart';
import 'package:flutter/foundation.dart';

class Product with Model, Entity {
  Name name;
  double price;
  String tag;
  String description;
  String coverImage;
  List<String> images;
  MyObservableList<Comment> comments;
  Map<String, String> parameters;

  Product({
    @required this.name,
    @required this.price,
    @required this.tag,
    @required this.coverImage,
    this.images,
    this.comments,
    this.parameters,
    this.description
  }) {
    images ??= MyObservableList()..addAll([coverImage]);
    tag ??= "";
    description ??= "";
    parameters ??= {};
  }
}


